import { http } from '@/utils/http'
export type giftItem = {
  id: string
  name: string
  image: string
  video: string
}

export type GiftItem = {
  result: giftItem[]
}

// 获取礼物列表
export const getGiftItemApi = () => {
  return http<GiftItem>({
    url: '/get/api/v1/develop/get-gift',
    method: 'GET',
    data: {
      u_id: uni.getStorageSync('userInfo').id
    }
  })
}
// 兑换金币
export const exchangeCoinApi = (id: string) => {
  return http({
    url: '/get/api/v1/develop/get-gift',
    method: 'POST',
    data: {
      u_id: uni.getStorageSync('userInfo').id,
    }
  })
}
